<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018-03-25
  Time: 13:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>新闻详情</title>
</head>
<body>
   <h2>${news.title}</h2>

<p>

    <c:forEach items="${sessionScope.get('categoryEnums')}" var="categoryEnum">
        <c:if test="${categoryEnum.code eq news.category}">
                ${categoryEnum.category}
        </c:if>
    </c:forEach>

    &nbsp;&nbsp;${news.company}&nbsp;&nbsp;<fmt:formatDate value="${news.createDate}" pattern="yyyy-MM-dd HH:mm"/></p>

<p>${news.company}记者&nbsp;&nbsp;${news.author}</p>

<p>${news.text}</p>

</body>
</html>
